<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
<link rel="stylesheet" href="./css/reset.css">
<link rel="stylesheet" href="./css/index.css">
<link rel="stylesheet" href="./css/art.css">
</head>
<body>
    <header>
        <h2>潇洒霸王的Blog</h2>
        <p>乘风行,无惧</p>
    </header>
    <nav>
        <ul>
            <li><a href="index.php">主页</a></li>
            <li>
            <a href="#">最热门<img src="./image/news.png" alt=""></a>

            </li>
            <li><a href="#">游戏</a></li>
            <li><a href="#">技术</a></li>
        </ul>
    </nav>
    <div id="main">
        <div id="lside">
            <article>
            <h2><a href="#"><?php echo $art['title']; ?></a></h2>
            <div class="arthead">
            <time><?php echo date('Y/m/d',$art['pubtime']); ?></time>
            <span>by 十八</span>
            <span id="t2"><a href="#"><?php echo $art['catname']; ?></a></span>
            <span id="t1"><a href="#"><?php echo $art['comm']; ?>条评论</a></span>
            </div>
                <?php if(!empty($art['pic'])) { ?>
                <img src="<?php echo '.' .$art['thumb']; ?>" alt="">
                <?php } ?>
            <p>
             <?php echo $art['content']; ?>
            </p>
            </article>
            <div id="comments">
            <?php foreach($comment as $v){ ?>
                <ol>
                    <li>
                        <img src="https://secure.gravatar.com/avatar/582b66ad5ae1b69c7601a990cb9a661a?s=50&d=identicon&r=pg" alt="">
                        <cite><a href="#"><?php echo $v['nick']; ?></a></cite> <br>
                        <time><?php echo date('Y年m月d日 H时i分' ,$v['pubtime']); ?></time>
                    </li>
                    <li>
                        <?php echo $v['content']; ?>
                    </li>
                </ol>
             <?php } ?>   
            </div>
            <div id="respond" class="comment-respond">
                <h3>Leave a Comment</h3>
                <?php if(isset($rs) && !$rs){ ?>
                 <h3 style="color: red;">评论失败</h3>
               <?php } ?>
                <form action="" method="post">
                    <p>
                    <input placeholder="nick" name="nick" type="text" value="" size="30">
                    </p>
                    <p>
                    <input placeholder="Email" name="email" type="text" value="" size="30">
                    </p>
                    <p>
                    <textarea name="content" cols="45" rows="8" aria-required="true"></textarea>
                    <p>
                    <input type="submit" value="Post Comment">
                </p>
                </form>
            </div>
        </div>
        <div id="rside">
            <aside>
                <form action="">
                    <input type="text" name="search" placeholder="Search...">
                </form>
            </aside>
            <aside>
                <h4>栏目列表</h4>
                <ul>
                      <?php foreach($cat as $v){ ?>
                        <li><a href="./index.php?cat_id=<?php echo $v['cat_id']; ?>"><?php echo $v['catname']; ?></a>&nbsp;(<?php echo $v['num']; ?>)</li>
                        <?php } ?>
                </ul>
            </aside>
            <aside>
                <h4>测试标题</h4>
                <ul>
                    <li><a href="">文章标题1</a></li>
                    <li><a href="">文章标题2</a></li>
                    <li><a href="">文章标题3</a></li>
                    <li><a href="">文章标题4</a></li>
                </ul>
            </aside>
            <aside>
                <h4>测试标题</h4>
                <ul>
                    <li><a href="">文章标题1</a></li>
                    <li><a href="">文章标题2</a></li>
                    <li><a href="">文章标题3</a></li>
                    <li><a href="">文章标题4</a></li>
                </ul>
            </aside>
            <aside>
                <h4>测试标题</h4>
                <ul>
                    <li><a href="">文章标题1</a></li>
                    <li><a href="">文章标题2</a></li>
                    <li><a href="">文章标题3</a></li>
                    <li><a href="">文章标题4</a></li>
                </ul>
            </aside>
        </div>
    </div>
    <div class="clear"></div>   
    <footer>
        Copyright &copy; 2015 · GeneratePress · WordPress
    </footer>
</body>
</html>